package excel.talkapi.fromserver;

import excel.talkapi.fromserver.message.ServerStatus;

import java.io.Serializable;

public class ServerResponse implements Serializable {
    private ServerStatus status;
    private Throwable exception;

    public ServerStatus getStatus() {
        return status;
    }

    public void setStatus(ServerStatus status) {
        this.status = status;
    }

    public Throwable getException() {
        return exception;
    }

    public void setException(Throwable exception) {
        if (exception == null) return;
        Exception exception1 = new Exception("来自服务器的异常信息: 异常[" + exception.getClass().getName() + "],消息:[" + exception.getMessage()+"],栈:");
        exception1.setStackTrace(exception.getStackTrace());
        this.exception = exception1;
    }
}
